package io.nutz.nutzsite.module.acm.models;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Comment;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Table;
		
/**
 * acm题目表 acm_problem
 * 
 * @author lrw
 * @date 2020-02-16
 */
@Table("problem")
public class Problem implements Serializable {
	private static final long serialVersionUID = 1L;
	
			@Id
		@Column("problem_id")
	@Comment("问题编号")
	private Integer problemId;

			/** 标题 */
	@Column("title")
	@Comment("标题")
	private String title;

			/** 描述 */
	@Column("description")
	@Comment("描述")
	private String description;

			/** 样例输入 */
	@Column("input")
	@Comment("样例输入")
	private String input;

			/** 样例输出 */
	@Column("output")
	@Comment("样例输出")
	private String output;

			/** 用例输入 */
	@Column("sample_input")
	@Comment("用例输入")
	private String sampleInput;

			/** 用例输出 */
	@Column("sample_output")
	@Comment("用例输出")
	private String sampleOutput;

			/** 特定Judger */
	@Column("spj")
	@Comment("特定Judger")
	private Integer spj;

			/** 提示 */
	@Column("hint")
	@Comment("提示")
	private String hint;

			/**  */
	@Column("source")
	@Comment("")
	private String source;

			/** 时间限制 */
	@Column("time_limit")
	@Comment("时间限制")
	private Integer timeLimit;

			/** 内存限制 */
	@Column("memory_limit")
	@Comment("内存限制")
	private Integer memoryLimit;

			/** 是否锁定 */
	@Column("defunct")
	@Comment("是否锁定")
	private boolean defunct;

			/** AC次数 */
	@Column("accepted")
	@Comment("AC次数")
	private Integer accepted;

			/** 已解次数 */
	@Column("solved")
	@Comment("AC人数")
	private Integer solved;

			/** 提交次数 */
	@Column("submit")
	@Comment("提交次数")
	private Integer submit;

			/** 提交者 */
	@Column("submit_user")
	@Comment("提交者")
	private Integer submitUser;

			/** 命题人 */
	@Column("author")
	@Comment("命题人")
	private String author;

			/** 命题时间 */
	@Column("create_date")
	@Comment("命题时间")
	private Date createDate;

			/** 难易度 */
	@Column("difficulty")
	@Comment("难易度")
	private Float difficulty;

			/** 比率 */
	@Column("ratio")
	@Comment("比率")
	private Float ratio;

			/** 标签 */
	@Column("tag")
	@Comment("标签")
	private String tag;

			/** 赛事编号 */
	@Column("contest_id")
	@Comment("赛事编号")
	private Integer contestId;

			/** 测试者 */
	@Column("oj_name")
	@Comment("测试者")
	private String ojName;

			/**  */
	@Column("oj_pid")
	@Comment("")
	private Integer ojPid;

			/**  */
	@Column("isvirtual")
	@Comment("")
	private Integer isvirtual;

	
	public void setProblemId(Integer problemId) 
	{
		this.problemId = problemId;
	}

	public Integer getProblemId() 
	{
		return problemId;
	}

	public void setTitle(String title) 
	{
		this.title = title;
	}

	public String getTitle() 
	{
		return title;
	}

	public void setDescription(String description) 
	{
		this.description = description;
	}

	public String getDescription() 
	{
		return description;
	}

	public void setInput(String input) 
	{
		this.input = input;
	}

	public String getInput() 
	{
		return input;
	}

	public void setOutput(String output) 
	{
		this.output = output;
	}

	public String getOutput() 
	{
		return output;
	}

	public void setSampleInput(String sampleInput) 
	{
		this.sampleInput = sampleInput;
	}

	public String getSampleInput() 
	{
		return sampleInput;
	}

	public void setSampleOutput(String sampleOutput) 
	{
		this.sampleOutput = sampleOutput;
	}

	public String getSampleOutput() 
	{
		return sampleOutput;
	}

	public void setSpj(Integer spj) 
	{
		this.spj = spj;
	}

	public Integer getSpj() 
	{
		return spj;
	}

	public void setHint(String hint) 
	{
		this.hint = hint;
	}

	public String getHint() 
	{
		return hint;
	}

	public void setSource(String source) 
	{
		this.source = source;
	}

	public String getSource() 
	{
		return source;
	}

	public void setTimeLimit(Integer timeLimit) 
	{
		this.timeLimit = timeLimit;
	}

	public Integer getTimeLimit() 
	{
		return timeLimit;
	}

	public void setMemoryLimit(Integer memoryLimit) 
	{
		this.memoryLimit = memoryLimit;
	}

	public Integer getMemoryLimit() 
	{
		return memoryLimit;
	}

	public boolean isDefunct() {
		return defunct;
	}

	public void setDefunct(boolean defunct) {
		this.defunct = defunct;
	}

	public void setAccepted(Integer accepted) 
	{
		this.accepted = accepted;
	}

	public Integer getAccepted() 
	{
		return accepted;
	}

	public void setSolved(Integer solved) 
	{
		this.solved = solved;
	}

	public Integer getSolved() 
	{
		return solved;
	}

	public void setSubmit(Integer submit) 
	{
		this.submit = submit;
	}

	public Integer getSubmit() 
	{
		return submit;
	}

	public void setSubmitUser(Integer submitUser) 
	{
		this.submitUser = submitUser;
	}

	public Integer getSubmitUser() 
	{
		return submitUser;
	}

	public void setAuthor(String author) 
	{
		this.author = author;
	}

	public String getAuthor() 
	{
		return author;
	}

	public void setCreateDate(Date createDate) 
	{
		this.createDate = createDate;
	}

	public Date getCreateDate() 
	{
		return createDate;
	}

	public void setDifficulty(Float difficulty) 
	{
		this.difficulty = difficulty;
	}

	public Float getDifficulty() 
	{
		return difficulty;
	}

	public void setRatio(Float ratio) 
	{
		this.ratio = ratio;
	}

	public Float getRatio() 
	{
		return ratio;
	}

	public void setTag(String tag) 
	{
		this.tag = tag;
	}

	public String getTag() 
	{
		return tag;
	}

	public void setContestId(Integer contestId) 
	{
		this.contestId = contestId;
	}

	public Integer getContestId() 
	{
		return contestId;
	}

	public void setOjName(String ojName) 
	{
		this.ojName = ojName;
	}

	public String getOjName() 
	{
		return ojName;
	}

	public void setOjPid(Integer ojPid) 
	{
		this.ojPid = ojPid;
	}

	public Integer getOjPid() 
	{
		return ojPid;
	}

	public void setIsvirtual(Integer isvirtual) 
	{
		this.isvirtual = isvirtual;
	}

	public Integer getIsvirtual() 
	{
		return isvirtual;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("problemId", getProblemId())
            .append("title", getTitle())
            .append("description", getDescription())
            .append("input", getInput())
            .append("output", getOutput())
            .append("sampleInput", getSampleInput())
            .append("sampleOutput", getSampleOutput())
            .append("spj", getSpj())
            .append("hint", getHint())
            .append("source", getSource())
            .append("timeLimit", getTimeLimit())
            .append("memoryLimit", getMemoryLimit())
            .append("defunct", isDefunct())
            .append("accepted", getAccepted())
            .append("solved", getSolved())
            .append("submit", getSubmit())
            .append("submitUser", getSubmitUser())
            .append("author", getAuthor())
            .append("createDate", getCreateDate())
            .append("difficulty", getDifficulty())
            .append("ratio", getRatio())
            .append("tag", getTag())
            .append("contestId", getContestId())
            .append("ojName", getOjName())
            .append("ojPid", getOjPid())
            .append("isvirtual", getIsvirtual())
            .toString();
    }
}
